package com.topvision.controller.sys;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * 系统页面视图
 */
@Controller
public class SysPageController {

    /**
     * 系统管理页面
     *
     * @param url
     * @return
     */
    @RequestMapping("sys/{url}.html")
    public String page(@PathVariable("url") String url) {
        return "sys/" + url + ".html";
    }

    @RequestMapping("glass/{url}.html")
    public String platform(@PathVariable("url") String url) {
        return "glass/" + url + ".html";
    }

    @RequestMapping("zwan/{url}/{url}.html")
    public String zwan(@PathVariable("url") String url) {
        return "zwan/" + url + "/" + url + ".html";
    }

    @RequestMapping("equipment/{url}.html")
    public String app(@PathVariable("url") String url) {
        return "equipment/" + url + ".html";
    }

    @RequestMapping("businessman/{url}.html")
    public String businessman(@PathVariable("url") String url) {
        return "businessman/" + url + ".html";
    }

    @RequestMapping("reportmodulepage/{url}.html")
    public String reportmodulepage(@PathVariable("url") String url) {
        return "reportmodulepage/" + url + ".html";
    }

    //眼镜模块---消息
    @RequestMapping("glass/message/{url}.html")
    public String glassMessage(@PathVariable("url") String url) {
        return "glass/message/" + url + ".html";
    }

    //文件模块
    @RequestMapping("glass/{url}/{url}.html")
    public String glassCommom(@PathVariable("url") String url) {
        return "glass/" + url + "/" + url + ".html";
    }

    //文件模块
    @RequestMapping("glass/sysupload/{url}.html")
    public String glassSysupload(@PathVariable("url") String url) {
        return "glass/sysupload" + "/" + url + ".html";
    }

    /**
     * 通用页面
     *
     * @param url
     * @return
     */
    @RequestMapping("{urlparent}/{url}/{url}.html")
    public String bambooparent(@PathVariable("urlparent") String urlparent,@PathVariable("url") String url) {
        return urlparent+ "/"+ url + "/" + url + ".html";
    }

    /**
     * 通用页面
     *
     * @param url
     * @return
     */
    @RequestMapping("{url}/{url}.html")
    public String bamboo(@PathVariable("url") String url) {
        return url + "/" + url + ".html";
    }
}
